package main;

import java.util.ArrayList;
import java.util.List;
import workers.IWorker;
import workers.Worker_db;

/**
 *
 * @author xDrake
 */
public class Collector {
    public static IWorker worker = new Worker_db(); 
    
    public static String test(){
        return worker.test();
    }
    
    public static Boolean addUser(User user){
        return worker.addUser(user);
    }
    
    public static Boolean isUserExists(String login){
        return worker.isUserExists(login);
    }
    
    public static Boolean isEmailExists(String email){
        return worker.isEmailExists(email);
    }    
    
    public static User doLogin(String login, String pass){
        return worker.doLogin(login, pass);
    }
    
    public static Boolean sendMessage(Message msg){
        return worker.sendMessage(msg);
    }
    
    public static ArrayList<Message> getLastMessages(){
        return worker.getLastMessages();
    }
}
